package Bidostar_Case;

import Bidostar_Data.Baseinfo;
import Bidostar_Page.ChangePwPage;
import org.testng.annotations.Test;

public class ChangePwCase extends Baseinfo
{
    @Test(priority = 1)
    public void ChangePwTest_URL1() throws Exception
    {
        PublicLoginCase pc = new PublicLoginCase();

        pc.PublicLogin_URL1();

        ChangePwPage cp = new ChangePwPage(pc.driver);

        if (cp.ChangePw())
        {
            logger.info("======密码修改成功======");
            pc.driver.close();
        } else
        {
            logger.warn("======密码修改失败======");
        }

    }

    @Test(priority = 2)
    public void ChangePwTest_URL2() throws Exception
    {
        PublicLoginCase pc = new PublicLoginCase();

        pc.PublicLogin_URL2();

        ChangePwPage cp = new ChangePwPage(pc.driver);

        if (cp.ChangePw())
        {
            logger.info("======密码修改成功======");
            pc.driver.close();
        } else
        {
            logger.warn("======密码修改失败======");
        }
    }

    @Test(priority = 3)
    public void ChangePwTest_URL3() throws Exception
    {
        PublicLoginCase pc = new PublicLoginCase();

        pc.PublicLogin_URL3();

        ChangePwPage cp = new ChangePwPage(pc.driver);

        if (cp.ChangePw())
        {
            logger.info("======密码修改成功======");
            pc.driver.quit();
        } else
        {
            logger.warn("======密码修改失败======");
        }
    }
}
